import http from '@/utils/http';

class UserService {
    // 获取所有用户
    async getAllUsers() {
        try {
            const response = await http.get('/user');
            return response.data;
        } catch (error) {
            console.error('获取用户列表失败:', error);
            throw error;
        }
    }

}

export default new UserService();